home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
scilab
/
demos
/
signal
/
signal.dem
< prev
next >
Wrap
Text File
|
1999-09-16
|
1KB
|
40 lines
//function signal()
mode(0)
xbasc();
getf('SCI/demos/signal/spect.dem');
getf('SCI/demos/signal/remezfilt.dem');
demolist=['Spectral Estimation ';
'IIR filter design ';
'Minimax FIR filter design'];
while %t then
num=x_choose(demolist(:,1),'Choose a topic');
if num=0 then
break;
else
select num
case 1 then
spectdem();
case 2 then
ystr=[ 'type (lp, hp, bp, sb) ';
'order (integer)';
'design (butt, cheb1, cheb2 , ellip)' ;
'cut-off frequencies (2-vector in [0, 0.5])';
'error values 0 delta(1),delta(2) 1 '];
w=x_mdialog('Choose filter type and parameters',...
ystr,['bp';'3';'ellip';'0.15 0.25';'0.08 0.035']);
hz=iir(evstr(w(2)),w(1),w(3),evstr(w(4)),evstr(w(5)));
[hzm,fr]=frmag(hz,256);
xselect();xbasc();
plot2d(fr',hzm')
xtitle('Discrete IIR filter '+'( '+ w(3)+' ) ',' ',' ');
case 3 then
xbasc();xselect();
remezfilt();
end;
end,
end;